import { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';
import { ReadOutlined } from '@vicons/antd';
import { renderIcon } from '@/utils/index';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/vip',
    name: 'Vip',
    redirect: '/vip/list',
    component: Layout,
    meta: {
      title: 'VIP管理',
      icon: renderIcon(ReadOutlined),
      sort: 2,
    },
    children: [
      {
        path: 'list',
        name: 'vip-list',
        meta: {
          title: 'VIP列表',
        },
        component: () => import('@/views/vip/index.vue'),
      },
      {
        path: 'info/:id',
        name: 'vip-info',
        meta: {
          title: 'VIP详情',
          hidden: true,
          activeMenu: 'vip-list',
        },
        component: () => import('@/views/vip/info.vue'),
      },
    ],
  },
];

export default routes;
